package dk.dashboardFP.interactionElementFramwork.slider {
	import dk.dashboardFP.shapes.Circle;
	import dk.dashboardFP.interactionElementFramwork.buttonViews.AbstractButtonView;
	import dk.dashboardFP.interactionElementFramwork.inputElementViews.AbstractInputElementView;

	/**
	 * @author josef
	 */
	public class AbstractSliderView extends AbstractInputElementView {

		
		private var _doHandleView : AbstractButtonView;
		private var _nDragLength : Number;

		public function AbstractSliderView(nDragLength:Number=100, doHandleView:AbstractButtonView=null) {
			
			_nDragLength = nDragLength;
			_doHandleView = doHandleView;
			
			super();
			setupElements();
		}
		
		protected function setupElements() : void {
			
			if (!_doHandleView) {
				_doHandleView=get_doHandleView();
			}
			
			addChild(_doHandleView);
		}

		public function get oHandleView() : AbstractButtonView {
			return _doHandleView;
		}
		
		private function get_doHandleView() : AbstractButtonView {
			
			var  doHandleView:AbstractButtonView=new AbstractButtonView();
			doHandleView.addChild(new Circle(3));
			
			return doHandleView;
		}

		public function get nDragLength() : Number {
			return _nDragLength;
		}
	}
}
